﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../source/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
    <link href="../window/css/enter_win.css" rel="stylesheet" media="screen" />
    <script src="../source/js/common_url.js"></script>
    <script src="../source/js/util.js"></script>
    <script src="../source/jquery/dist/jquery.min.js"></script>
    <script src="../source/My97DatePicker/4.8/WdatePicker.js"></script>
    <script src="../source/layer/layer.js"></script>
    <script>

        var g_moveModel = "";
        var g_queueId = "";
        var g_hospitalId = "";
        var g_moveNum = "";
        var g_id = "";
        var upDownMoveApi = STSUrl + "/QueuingOperate/upDownMove";

        $(function () {
            g_moveModel = GetQueryString("movemodel");
            g_queueId = GetQueryString("queueId");
            g_hospitalId = GetQueryString("hospitalId");
            g_id = GetQueryString("id");

            if (g_moveModel == "up") {
                $("#move_label").html("向上移动")
            } else {
                $("#move_label").html("向下移动")
            }
        });


        function save(callback) {
            var _moveNum = $("#input_moveNumber").val();
            if (g_moveModel == "down") {
                g_moveNum = parseInt(0 - _moveNum);
                console.log(g_moveNum);
            }
            else {
                g_moveNum = parseInt(_moveNum)
            }
            $.ajax({
                url: upDownMoveApi,
                type: 'post',
                async: false,
                data: {
                    id: g_id,
                    queueId: g_queueId,
                    hospitalId: g_hospitalId,
                    moveNum: g_moveNum
                },
                success: function (d) {
                    var res = JSON.parse(d);
                    callback&&callback(res);
                }
            });
        }



    </script>
    <style>
        .col-xs-4, .col-xs-2 {
            height: 35px;
            line-height: 35px;
            font-size: 14pt;
            padding-top: 0;
        }
    </style>
</head>
<body>
    <div>
        <form class="form-horizontal form-enter">
            <div class="form-group">
                <div class="col-xs-4" id="move_label">
                </div>
                <div class="col-xs-6">
                    <input type="text" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" class="form-control" id="input_moveNumber" name="input_moveNumber">
                </div>
                <div class="col-xs-2" style="text-align:left">
                    位。
                </div>
            </div>
        </form>
    </div>
</body>
</html>
